<template>
  <div>
    <div>
      <a-tabs default-active-key="1" @change="callback">
        <a-tab-pane key="1" tab="DCPR群解调设备(主)">
          <group-demodulator-main ref="main" />
        </a-tab-pane>
        <a-tab-pane key="2" tab="DCPR群解调设备(备)" force-render>
          <group-demodulator-backup ref="backup" />
        </a-tab-pane>
      </a-tabs>
    </div>
  </div>
</template>

<script>
import GroupDemodulatorBackup from './modules/GroupDemodulatorBackup'
import GroupDemodulatorMain from './modules/GroupDemodulatorMain'
export default {
  props: {},
  components: { GroupDemodulatorMain, GroupDemodulatorBackup },

  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    callback(key) {
      console.log(key)
      if (key == '1') {
        this.$nextTick(() => {
          this.$refs.main.getList()
          this.$refs.main.getListData()
        })
      } else if (key == '2') {
        this.$nextTick(() => {
          this.$refs.backup.getList()
          this.$refs.main.getListData()
        })
      }
    }
  }
}
</script>

<style lang="less" scoped></style>
